package cn.com.bonc.khjy.date.dao.dataSource2;

import cn.com.bonc.khjy.bean.Activity;
import cn.com.bonc.khjy.bean.Channel;
import cn.com.bonc.khjy.bean.Product;
import cn.com.bonc.khjy.date.mapper.dataSource2.CommonMapper2;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Repository;

import java.util.List;
import java.util.Map;

@Repository
public class CommonDao2 {

    @Autowired
    private CommonMapper2 mapper2;

    private Logger logger = LoggerFactory.getLogger(CommonDao2.class);

    public int insertActivity(Activity activity){ return mapper2.insertActivity(activity); }

    public int insertChannel(Channel channel){
        return mapper2.insertChannel(channel);
    }

    public int insertProduct(Product product){
        return mapper2.insertProduct(product);
    }

    public List<Map<String, Object>> getAllField() { return mapper2.getAllField(); }

    public int insertFieldBindInfo(String activityCode, String fieldName) {
        return mapper2.insertFieldBindInfo(activityCode,fieldName);
    }
}
